<template>
  <a-card class="content" :bordered="false">
    <div style="padding-bottom: 8px; margin-bottom: 16px">
      <span>流水总金额：</span>
      <span>{{bigdecimal?bigdecimal:0}}元</span>
    </div>
    <a-table
      rowKey="id"
      :columns="tableOption"
      :dataSource="loadData"
      :pagination="false"
      :loading="loading"
      :scroll="{ x: 1720 }"
    >
      <template slot-scope="text, record, index" slot="indexLabel">
        <span>{{ index + (page.current - 1) * page.size + 1 }}</span>
      </template>
      <template slot-scope="text, record" slot="orderStatus">
        <span>{{ record.orderStatus | orderStatus }}</span>
      </template>
      <template slot-scope="text, record" slot="workStatus">
        <span>{{ record.workStatus | workStatus }}</span>
      </template>
      <template slot-scope="text, record" slot="orderType">
        <span>{{ record.orderType | orderType }}</span>
      </template>
      <template slot-scope="text, record" slot="orderSource">
        <span>{{ record.orderSource | orderSource }}</span>
      </template>
      <span slot="action" slot-scope="text, record">
        <template>
          <a-button type="link" @click="orderDetails(record)">详情</a-button>
        </template>
      </span>
    </a-table>
    <template>
      <div style="width: 100%; position: relative; height: 60px">
        <a-pagination
          show-quick-jumper
          show-size-changer
          v-model="page.current"
          :page-size-options="['10', '20', '30', '40', '50']"
          :total="page.total"
          :page-size.sync="page.size"
          @showSizeChange="onShowSizeChange"
          @change="onShowSizeChange"
          :show-total="(total) => `共 ${total} 条`"
          style="margin: 2% 0; position: absolute; right: 1%"
        />
      </div>
    </template>
  </a-card>
</template>

<script src='./allOrder.js'></script>

<style lang="less">
.content {
  & > .ant-card-body {
    padding: 0;
    padding-top: 8px;
  }
}
</style>